package com.bestdreamer.tree;

public class TestTree {

    public static void main(String[] args){
        Tree tree = new Tree();
        tree.insert(15,"James");
        tree.insert(6,"Yao");
        tree.insert(7,"Ko");
        tree.insert(20,"Mac");
        tree.insert(18,"Bom");
        tree.insert(17,"Tim");
        tree.insert(45,"Kevin");
        tree.insert(16,"Jack");
        tree.insert(13,"Tom");
        tree.insert(8,"Write");


//        System.out.println(tree.root.data);
//        System.out.println(tree.root.rightChild.data);
//        System.out.println(tree.root.leftChild.data);
//
//        Node node = tree.find(20);
//        System.out.println(node.sData);

//        tree.frontOrder(tree.root);
//        tree.inOrder(tree.root);
//        tree.afterOrder(tree.root);
        tree.delete(20);
        tree.inOrder(tree.root);
    }
}
